#include #include #include const byte dataPins [ 7 ] = { 2 , 3 , 4 , 5 , 6 , 7 , 8 } ; // Segment data pins: D0 - D6 const byte addrPins [ 2 ] = { A1 , A2 } ; // Segment address pins: A0, A1 const byte wrenPins [ ] = { A0 , A3 }; // Write Enable pins (left to right) RTC_DS3231 rtc; char t[32]; HPDL1414 hpdl ( dataPins , addrPins , wrenPins , sizeof ( wrenPins ) ) ; void setup ( ) { Serial.begin(9600); Wire.begin(); hpdl.begin ( ) ; hpdl.printOverflow(true); hpdl.clear ( ) ; hpdl.print("*-TIME-*"); delay(3000); hpdl.clear(); rtc.begin(); rtc.adjust(DateTime(F(__DATE__),F(__TIME__))); //rtc.adjust(DateTime(2022, 8, 226, 20, 19, 0)); } void loop ( ) { DateTime now = rtc.now(); sprintf(t, "%02d-%02d-%02d", now.hour(), now.minute(), now.second()); hpdl.clear(); hpdl.print(t); }